{{#extends @html/community/base.html}}

<!-- Назначаем title страницы -->
{{:title}}{{tmp.post.title}}{{/:title}}

{{:init}}
	{{!connect "theme/quest/quest.css"}}
	{{!connect "theme/quest/votes.css"}}

	{{!connect "jquery.js"}}
	{{!connect "cpaint2.inc.js"}}
	{{!connect "misc.js"}}
	{{!connect "tinymce/tiny_mce_src.js"}}
	{{!connect "tiny_mce_start.js"}}

	{{!connect "treecomments/CommentsContainerView.js"}}
	{{!connect "treecomments/commentscontainer.js"}}
	{{!connect "treecomments/CommentView.js"}}
	{{!connect "treecomments/comment.js"}}
	{{!connect "treecomments/CommentSubmitView.js"}}
	{{!connect "treecomments/commentsubmit.js"}}
	{{!connect "treecomments/CommentsControlView.js"}}
	{{!connect "treecomments/commentscontrol.js"}}
	{{!connect "treecomments/CommentsLoaderView.js"}}
	{{!connect "treecomments/commentsloader.js"}}
	{{!connect "treecomments/commentsloadercontrol.js"}}
	{{!connect "treecomments.js"}}

    {{!connect "jplugins/jtemplates.js"}}
    <!-- {{!connect "jplugins/interface.js"}} -->
    {{!connect "jplugins/interface/idrag.js"}}
    {{!connect "jplugins/interface/idrop.js"}}
    {{!connect "jplugins/interface/iutil.js"}}
    {{!connect "jplugins/interface/isortables.js"}}

    {{!connect "jplugins/custom.js"}}
    {{!connect "quest/doc.js"}}
    {{!connect "quest/show.js"}}

	{{!connect 'theme/page/common.css'}}
	{{!connect 'theme/view/feed.css'}}
	{{!connect 'theme/page/comments.css'}}

    <!-- RSS записей сообщества -->
    {{@:connect_rss url=@:rss_url title=@:rss_title}}
    {{:rss_title}}Все записи сообщества{{/:rss_title}}
    {{:rss_url}}{{/}}{{community.url}}/feed.xml{{/:rss_url}}

    <!-- RSS комментов сообщества -->
    {{@:connect_rss url=@:rss_comments_url title="Все комментарии сообщества"}}
    {{:rss_comments_url}}{{/}}{{community.url}}/comments.xml{{/:rss_comments_url}}

<script type="text/javascript">
    var treecomments_load_url = '{{feed_url}}/ajax';
</script>
{{/:init}}


{{:body}}

    {{@:community_head}}

    {{?is_new!=1}}
{{@html/widgets/widget.html:background}}
<div class="popup-widgets" id="voting_form" style="display: none;"></div>
	{{/?}}

    <!-- content zone -->
    <!-- Вот тут класс widgetcolumn это колонка в которой будет drag, а класс widget это итем которые таскается -->
    <div class="content-cindex layout-standard">
        <div class="layout-c-left widgetcolumn wg-droppable" id="column0">
            {{@html/widgets/widget.html:addwidget_button}}
            {{column0}}
        </div>
        <div class="layout-c-right widgetcolumn wg-droppable" id="column2">
            {{column2}}
        </div>
        <div class="layout-c-main">
            {{@:realbody}}
        </div>
    </div>

    {{@html/common/footer.html}}
{{/:body}}

{{:realbody}}
		<div class="quest-page-top"><div></div></div>
		<div class="quest-page content-posts">
			{{@:main}}
			{{@:tabs_panel}}
            <div id="itemslist" class="list-">
    			{{!for search_items do=@:search_item}}
    		</div>
		</div>
		<div class="quest-page-bottom"><div><div></div></div></div>


{{/:realbody}}

{{:main}}
<!-- ========================= Установки для работы js ============== -->
<!-- для imageswitcher.js -->
{{@html/config/imageswitcher.html}}
<a href="{{ajax_url}}" id="feed_url"></a>
<a href="{{items_remaining}}" id="items_remaining"></a>
<!-- ========================= Установки для работы js ============== -->


			<div class="quest-h1-type-1">
				{{quest.title}}
			</div>
			<div class="quest-description content">
				{{quest.anonce}}
				{{quest.descript}}
			</div>
{{/:main}}

{{:tabs_panel}}
<div class="quest-nomination-list">
    {{!for votings do=@:voting_tab}}
    {{:voting_tab *cur}}
    <div class="quest-nomination-active"><div>{{*name}}</div></div>
    {{/:voting_tab}}

    {{:voting_tab}}
    <div><a href="{{*url}}">{{*name}}</a></div>
    {{/:voting_tab}}
	{{?votings_hide}}<div>
		<div class="quest-input-down" style="display: none;">
		{{!for votings_hide do=@:voting_tab_h}}
		    {{:voting_tab_h}}
		    <a href="{{*url}}">{{*name}}</a>
		    {{/:voting_tab_h}}
		</div>
		<a href="#" onclick="return showHidenTabs();" class="quest-more"><img src="{{images}}quest/quest_more.gif" alt="">Еще</a>
	</div>{{/?}}
</div>
<div class="quest-clear"></div>
<div class="quest-sortirovka">
	<div class="quest-finalist-but"><div><a href="{{finish_url}}">{{?is_finish}}Все{{?:}}Финалисты{{/?}}</a>&nbsp;({{final_count}})</div></div>
	<div class="quest-sortirovka-element">
		{{?sort_by==0}}<span>По популярности</span><a href="{{sort_url}}">По дате</a>{{?:}}
		<a href="{{sort_url}}">По популярности</a><span>По дате</span>{{/?}}
	</div>
	<div class="quest-clear"></div>
</div>
{{/:tabs_panel}}

{{:search_item}}
<div class="item-" id="i{{*post.oid}}">

<!-- Заголовок записи -->
<h2 class="header-">
	{{?!community}}<a href="{{/}}{{*community.url}}">{{*community.title}}</a> &rarr; {{/?}}
	{{?*section.title && !current_tdi}}<a href="{{/}}{{*community.url}}/{{*section.url}}">{{*section.title}}</a> &rarr; {{/?}}
	{{!doctype @html/doctypes/__DOCTYPE__/view_feed.html:title *post.type}}
</h2>

<!-- Метаинформация -->
<div class="meta-">

	<!-- Автор -->
	{{?*platonicaid_author}}
		{{@:poster poster=*platonicaid_author}}
	{{?:}}
		{{@:poster poster=*poster}}
	{{/?}}
	{{:poster}}
		{{?poster.oid}}
		<!-- registered -->
		<a href="{{?!poster.url}}{{/}}{{community.url}}/members/{{poster.oid}}{{?:}}{{poster.url}}{{/?}}" title="Профиль пользователя">
			{{?poster.avatar}}<img src="{{/}}{{!link_to poster.avatar 'imagestorage' 'sm2'}}" class="avatar-" />{{/?}}
			{{?!poster.avatar && poster.avatar_url}}<img src="{{poster.avatar_url}}" class="avatar-" />{{/?}}
			{{?!poster.avatar && !poster.avatar_url}}<img src="{{!static type='images' 'avatar-22x22.png'}}" class="avatar-" />{{/?}}
		</a>
		<a href="{{?!poster.url}}{{/}}{{community.url}}/members/{{poster.oid}}{{?:}}{{poster.url}}{{/?}}" title="Профиль пользователя" class="user-">{{poster.name}}</a>&nbsp;
		{{?:}}
		<!-- anonymous -->
		<img src="{{!static type='images' 'avatar-22x22.png'}}" class="avatar-" />
		<span class="user-">Платонимус</span>&nbsp;
		{{/?}}
	{{/:poster}}

	<!-- Дата -->
	{{*post.ctime|date "%d %M %Y, в %H:%i"}}

	<!-- Управление
	{{?*acl.item_edit.is_allowed}}<a href="{{/}}{{community.url}}/{{*post.oid}}/edititem">Редактировать</a>{{/?}}
	{{?*acl.item_delete}}<a href="{{/}}{{community.url}}/{{*post.oid}}/deleteitem">Удалить</a>{{/?}}-->
</div>

<!-- Подрубаем тело записи -->
{{!doctype @html/doctypes/__DOCTYPE__/view_feed.html:body *post.type}}

<!-- Блок комментариев -->
<ul class="comments-" id="c{{*post.oid}}">
	{{?*post.commentscount}}
	<li><a name="{{*post.commentscount}}" class="js_ccount pa"></a>Уже есть</li>
	<li class="link- html-active-zone"><span class="bg1-"><a href="{{/}}{{community.url}}/{{*post.oid}}?showcomments#comments" class="js_comments">{{!plural *post.commentscount "комментари" "й" "я" "ев"}}</a></span></li>
	{{?:}}
	<li>Комментариев еще нет</li>
	{{/?}}
	{{?*acl.comment_create.is_allowed}}
	<li class="add- html-active-zone"><span class="bg1-"><a href="{{/}}{{community.url}}/{{*post.oid}}?showcomments#add" class="js_submitform">Добавить?</a></span></li>
	{{/?}}
</ul>
{{@:quest_actions}}

<!-- Блок тегов -->
{{?*tags}}
<ul class="tags-">
	<li class="name-">Тематика:</li>
	{{!for *tags do=@:tag}}
	{{:tag *is_current}}<li>{{*title}}{{?!For.last}},{{/?}}</li>{{/:tag}}
	{{:tag}}<li><a href="?tag={{*title|escape type='url'}}" title="Выбрать все записи с меткой &laquo;{{*title}}&raquo;">{{*title}}</a>{{?!For.last}},{{/?}}</li>{{/:tag}}
</ul>
{{/?}}
</div>
{{/:search_item}}

{{:quest_actions}}
<div id="vote_panel_{{*post.oid}}_{{quest.id}}">
{{@:action_panel_content quest=quest.id doc=*post.oid state=*btn_state balls=*balls}}
</div>
<div id="vote_container_{{*post.oid}}_{{quest.id}}" style="display: none;" class="votes-window">{{*action_url}}</div>
{{/:quest_actions}}

{{:action_panel_content}}
<img onclick="return showDocumentAction({{quest}},{{doc}},this)" src="{{images}}quest/votes-ico-{{state}}.gif" alt="+" class="que1t-votes-button" />
<div class="votes-ball">{{balls}}</div>
<div class="quest-clear"></div>
{{/:action_panel_content}}
